///PHILOTES Source Code.  (C)2012 PhiloLabs
#pragma once

#include "ExtrasPrerequisites.h "

#include "OgrePrerequisites.h"
#include "OverlayElement.h"
#include "PanelOverlayElement.h"
#include "BorderPanelOverlayElement.h"
#include "TextAreaOverlayElement.h"

namespace Extras {

	class _PhiloExtrasExport OverlayElementFactory : public MemAlloc_SceneObj
    {
    public:
        
        virtual ~OverlayElementFactory () {}
        
        virtual OverlayElement* createOverlayElement(const Ogre::String& instanceName) = 0;
        
        virtual void destroyOverlayElement(OverlayElement* pElement) { delete pElement; }
        
        virtual const Ogre::String& getTypeName(void) const = 0;
    };


    
    class _PhiloExtrasExport PanelOverlayElementFactory: public OverlayElementFactory
    {
    public:
        
        OverlayElement* createOverlayElement(const Ogre::String& instanceName)
        {
            return PHILO_NEW PanelOverlayElement(instanceName);
        }
        
        virtual const Ogre::String& getTypeName(void) const;
    };

    
    class _PhiloExtrasExport BorderPanelOverlayElementFactory: public OverlayElementFactory
    {
    public:
        
        OverlayElement* createOverlayElement(const Ogre::String& instanceName)
        {
            return PHILO_NEW BorderPanelOverlayElement(instanceName);
        }
        
        virtual const Ogre::String& getTypeName(void) const;
    };

    
    class _PhiloExtrasExport TextAreaOverlayElementFactory: public OverlayElementFactory
    {
    public:
        
        OverlayElement* createOverlayElement(const Ogre::String& instanceName)
        {
            return PHILO_NEW TextAreaOverlayElement(instanceName);
        }
        
        virtual const Ogre::String& getTypeName(void) const;
    };
	

}

